<template>
  <el-dialog
    :visible.sync="dialogFormVisible"
    :title="title">
    <el-form :model="commentDetail" ref="SettleDetail" :disabled="true">
      <div class="block">
        <span class="demonstration">评分</span>
        <el-slider
          v-model="commentDetail.comment.score*20"
          :step="20"
          :format-tooltip="formatTooltip"
          show-stops>
        </el-slider>
      </div>
      <el-form-item label="维修金额：">{{ commentDetail.order.totalPrice }}</el-form-item>
      <el-form-item label="评论：">{{ commentDetail.comment.context }}</el-form-item>
    </el-form>
  </el-dialog>
</template>

<script>
export default {
  name: "ViewOrderComment",
  data() {
    return {
      dialogFormVisible: false,
      title: '',
      commentDetail: {
        order: {},
        comment: {},
        image: {}
      },
      score: ''
    }
  },
  methods: {
    reveal(order, comment, image) {
      this.dialogFormVisible = true
      this.title = '评论浏览'
      this.commentDetail.order = order
      this.commentDetail.comment = comment
      this.commentDetail.image = image
      console.log(this.commentDetail)
    },
    formatTooltip(value) {
      return value / 20;
    },}}
</script>

<style scoped>

</style>
